package com.clouddot.baipai.model;


import android.content.Context;

import com.clouddot.baipai.contract.IHomeWorkFragmentContract;
import com.clouddot.baipai.http.BanPaiRetrofitHelper;
import com.clouddot.baipai.http.entity.response.getCourseByIdResponse;
import com.clouddot.baipai.http.entity.response.getCourseListResponse;
import com.clouddot.baipai.infrastructure.environment.Env;

import org.wxy.sdk.base.impl.BaseModelImpl;

import java.util.ArrayList;

import rx.Observable;

public class HomeWorkFragmentModel extends BaseModelImpl implements IHomeWorkFragmentContract.IModel {
    public HomeWorkFragmentModel(Context context) {
        super(context);

    }


    @Override
    public Observable<ArrayList<getCourseListResponse>> getCourseListByStudentId(String acttype, String StudentId) {
        return BanPaiRetrofitHelper.getInstance(getContext()).getServer().getCourseListByStudentId(Env.getAppContext().IP,acttype,StudentId);
    }

    @Override
    public Observable<ArrayList<getCourseListResponse>> getCourseListByClassId(String acttype, String classId) {
        return BanPaiRetrofitHelper.getInstance(getContext()).getServer().getCourseListByClassId(Env.getAppContext().IP,acttype,classId);

    }

    @Override
    public Observable<getCourseByIdResponse> getCourseHomeWorkById(String acttype, String TeachingClassId, int pageindex, int pagesize) {
        return BanPaiRetrofitHelper.getInstance(getContext()).getServer().getCourseHomeWorkById(Env.getAppContext().IP,acttype,TeachingClassId,pageindex,pagesize);
    }
}
